package cn.tradewin.pmp.pages.test;

import javax.validation.constraints.NotNull;

import org.apache.tapestry5.annotations.Log;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.Validate;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.slf4j.Logger;

public class Validator1 {
	@Property
	@NotNull
	@Validate("maxlength=10")
	private int age;
	
	@Property
	@NotNull
	@Validate("maxlength=10")
	private String name;
	
	@Inject
	Logger log;
	
	@Log
	void onSuccess() {
		log.debug("age = " + age);
		log.debug("name = " + name);
	}
}
